<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //添加滚动事件
        window.addEventListener('scroll', this.removeFixed, true)
        //vue添加滚动事件必须要在销毁阶段消除，不然会一直报错，而且消除方式要带true，不然无效
        window.removeEventListener("scroll", this.removeFixed, true)
    </script>
</body>

</html>